package jaysun.business.action;

import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import jaysun.core.action.Action;
import jaysun.core.action.ActionResult;
import jaysun.core.action.ResultContent;
import jaysun.core.action.ResultType;

//业务action
public class IndexAction implements Action {

	@Override
	public ActionResult execute(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {

		Map tempmap = new HashMap();
		List classList = new ArrayList();
		tempmap.put("name", "作业一：写一个Mvc框架");
		classList.add(tempmap);
		req.setAttribute("classList", classList);
		return new ActionResult(new ResultContent("index.jsp"), ResultType.Forward);
	}

}
